package indi.kider.server.apabus.service.related;

import indi.kider.common.model.employee.Employee;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.vankid.common.model.base.CommonResponse;

import java.util.List;

@FeignClient(value = "human-resources")
@RestController
@RequestMapping(value = "employee")
public interface EmployeeService {

    @GetMapping("{employeeId}")
    CommonResponse<Employee> getEmployeeById(@PathVariable(value = "employeeId") Long employeeId);

    @GetMapping("/loginName/{loginName}")
    CommonResponse<List<Employee>> getEmploeesToLogin(@PathVariable (value = "loginName")String loginName);

}
